<script type="text/template" id="tpl-icon">
	<div id="&&{uuid}" mtype="icon" class="deskicon" style="background-image:url(&&{icon})">
		<label>&&{name}</label>
	</div>
</script>
<script type="text/template" id="tpl-session-icon">
	<div class="menuItem" mid="&&{keyId}" id="menu-icon-&&{keyId}">
		<div class="edge">0</div>
		<img src="{@if user.image}&&{user.image}{@else}res/images/user-header.png{@/if}" mid="&&{keyId}" title="&&{user.name}" />
		<span>{@if user.name}&&{user.name}{@else}匿名用户{@/if}</span>
	</div>
</script>
<script type="text/template" id="tpl-session-menu">
	<a href="javascript:;" name="close" pid="&&{uuid}" mtype="plugin" class="easyui-linkbutton" data-options="plain:true">&&{name}</a>
</script>
<script type="text/template" id="tpl-session-panel">
	<div class="easyui-layout" data-options="fit:true,border:false" id="layout-&&{sessionId}">
		<div data-options="region:'west',border:false" style="width: 460px;">
			<div class="easyui-layout" data-options="fit:true,border:false">
				<div data-options="region:'center',border:false" id="dialog-wrap-&&{keyId}" name="session-dialog">
					<ul id="&&{keyId}"></ul>
				</div>
				<div data-options="region:'south',border:false" style="height:132px;">
					<div class="easyui-layout" data-options="fit:true">
						<div data-options="region:'north'" id="toolbar-&&{keyId}" class="session-toolbar" style="height: 28px;">
							<a href="javascript:;" name="close" class="easyui-linkbutton" data-options="plain:true">关闭</a>
							<a href="javascript:;" name="relay" class="easyui-linkbutton" data-options="plain:true">转发</a>
							<a href="javascript:;" name="print" class="easyui-linkbutton" data-options="plain:true">对话截图(beta)</a>
						</div>
						<div data-options="region:'center',border:false">
							<textarea name="session-input" mid="&&{keyId}" style="width: 460px;height: 80px;border:0 solid #cfcfcf;"></textarea>
							<div class="myProcess"><div></div></div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div data-options="region:'center'">
			<div class="easyui-tabs" id="tab-&&{keyId}" data-options="fit:true,tabPosition:'bottom',border:false">
				<div title="个人信息">
					<table class="userInfo" id="base-info-&&{keyId}">
						<thead>
							<tr>
								<td colspan="2">基本信息(可修改)<a name="commit" href="#" style="position: absolute;right: 20px;display: none;" cid="&&{customer.id}">提交</a></td>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td class="label">真实名称</td>
								<td class="value">
									<input type="text" cid="&&{customer.id}" name="name" oval="&&{customer.name}" value="&&{customer.name}" />
								</td>
							</tr>
							<tr>
								<td class="label">手机号码</td>
								<td class="value">
									<input type="text" cid="&&{customer.id}" name="mobile" oval="&&{customer.mobile}" value="&&{customer.mobile}" />
								</td>
							</tr>
							<tr>
								<td class="label">电子邮箱</td>
								<td class="value">
									<input type="text" cid="&&{customer.id}" name="email" oval="&&{customer.email}" value="&&{customer.email}" />
								</td>
							</tr>
							<tr>
								<td class="label">联系地址</td>
								<td class="value">
									<input type="text"  cid="&&{customer.id}" name="address" oval="&&{customer.address}" value="&&{customer.address}" />
								</td>
							</tr>
						</tbody>
					</table>
					<table class="userInfo" id="business-info-&&{keyId}">
						<thead>
							<tr>
								<td colspan="2">业务信息(只读)</td>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td class="label">渠道</td>
								<td class="value">&&{channel}</td>
							</tr>
							<tr>
								<td class="label">渠道账号</td>
								<td class="value">&&{from}</td>
							</tr>
							<tr>
								<td class="label">访问次数</td>
								<td class="value">&&{customer.count}</td>
							</tr>
							<tr>
								<td class="label">最近访问时间</td>
								<td class="value">
									<input type="text" value="&&{customer.lastTime|timeFormat}" />
								</td>
							</tr>
							<tr>
								<td class="label">上一次会话</td>
								<td class="value">
									<label sid="&&{customer.lastSession}" name="readSession">查看</label>
								</td>
							</tr>
							<tr>
								<td class="label">收录时间</td>
								<td class="value">
									<input type="text" value="&&{customer.createTime|timeFormat}" />
								</td>
							</tr>
							<tr>
								<td class="label">客户标识</td>
								<td class="value"></td>
							</tr>
						</tbody>
					</table>
				</div>
				<div title="会话小结">
					<iframe src="/session/summary/&&{keyId}" width="100%" height="96%"></iframe>
				</div>
			</div>
		</div>
	</div>
</script>
<script type="text/template" id="tpl-message-li">
	<li style="margin-bottom: 10px;">
		<div class="message">
			<img class="header" src="&&{user.image}" />
			<span class="time">&&{user.name}</span>
			<br />
			<div class="content {@if source==0}uMessage{@else}myMessage{@/if}">
				{@if type=="image"}
				<a href="&&{content}" data-lightbox="example-1">
					<img class="ltboxA" data-src="&&{content}" onload="var url=this.getAttribute('data-src');var i=new Image();i.className='ltboxA';i.onload=function(){};i.src=url;$(this).replaceWith(i);" src="res/images/load_8.gif" alt="我是图片">
				</a>
				{@else if type=="voice"}
					<audio controls="controls" src="&&{content}"></audio>
				{@else}
				 &&{content}
				{@/if}
			</div>
		</div>
	</li>
</script>

<script type="text/template" id="tpl-person">
	<div class="easyui-tabs" data-options="fit:true">
		<div title="个人统计(Demo)" style="padding:5px">
			<div class="row">
				<div class="col-xs-6">
					<div class="infoCard">
						<div class="count">10</div>
						<span class="cinfo">Total Done</span>
						<br />
						<div class="percent">
							<div></div>
						</div>
						<div class="pinfo">
							95%
						</div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="infoCard">
						<div class="count">10</div>
						<span class="cinfo">Total Done</span>
						<br />
						<div class="percent">
							<div></div>
						</div>
						<div class="pinfo">
							95%
						</div>
					</div>
				</div>
			</div>

		</div>
		<div title="会话查询" style="padding:10px">
			<div id="ft" style="padding:2px 5px;">
				<input type="text" placeholder="会话关键字查询" />
				<button>查询</button>
			</div>
			<table id="session-grid" data-options=""></table>
		</div>
		<div title="个人设置(beta版,数据不持久化)" data-options="iconCls:'icon-help'" style="padding:10px">
			<table id="person-config-grid" class="easyui-propertygrid" style="width:300px" data-options="fit:true">
			</table>
		</div>
	</div>
</script>

<script type="text/template" id="tpl-session-detail">
	<div class="easyui-layout" data-options="fit:true">
		<div title="会话消息" data-options="region:'center'">
			<ul id="last-session-history-&&{sessionId}"></ul>
		</div>
		<div title="会话小结" data-options="region:'south'" style="height: 120px;">
		</div>
	</div>
</script>
